<script language='javascript' type='text/javascript' src="<?=base_url('menus')?>scripts/menu.js"></script>
<?php echo form_open(uri_string()); ?>
<table border="0" cellspacing="0" cellpadding="0" class="infoTable">
  <tr>
    <td id='infoStr'>Parent Menu:</td>
    <td id='infoInput' align='left'>{menu_tree}</td>
  </tr>
  <tr>
    <td id='infoStr'>Name:</td>
    <td id='infoInput' align='left'><input name="name" type="text" value="<?=h($name); ?>" size="30" /><?=form_error('name');?></td>
  </tr>
  <tr>
    <td id='infoStr'>Link:</td>
    <td id='infoInput' align='left'><input name="link" type="text" value="<?=h($link); ?>" size="30" /></td>
  </tr>
  <tr>
    <td id='infoStr'>Order:</td>
    <td id='infoInput' align='left'><input name="ordering" type="text" value="<?=h($ordering); ?>" size="10" /><?=form_error('ordering');?></td>
  </tr>
  <tr>
    <td id='infoStr'>Enable:</td>
    <td id='infoInput' align='left'><input name='enabled' type='checkbox' <?=!empty($enabled)?'checked':'';?> /></td>
  </tr>
  <tr>
    <td id='infoStr'>Parameters:</td>
    <td id='infoInput' align='left'><textarea name="param" rows="3" cols="30"><?=$link?></textarea></td>
  </tr>
  <tr>
    <td id='infoStr'>&nbsp;</td>
    <td id='infoInput' align='left'>
        <input type="submit" value="Save" class="save_button" />&nbsp;
        <input type="button" value="Cancel" class="cancel_button" onclick="menu.cmsmenu_cancel(<?=$parent_id?>)" />
    </td>
  </tr>
</table>
</form>